package demo1;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class TestApp {
    public static void main(String[] args) {
        ApplicationContext ac=new ClassPathXmlApplicationContext("demo1/demo1.xml");
        UserService service= ac.getBean(UserService.class);
        try{
            System.out.println(service.login("tom", "123"));
        }catch (Exception e){
            System.out.println(e.getMessage());
        }

    }
}
